home *** CD-ROM | disk | FTP | other *** search
- This version of Origami can handle the mouse of your system, if you are using
- MGR or X-windows and xterm's. If you want to add an additional mouse support,
- the following will give you some hints for doing it properly:
-
- * In h/os.h there are the defines, which control the handling and defining of
- mouse-dependent things. Origami can handle more than one mouse-support.
- Therefor we declared a enum, containing all possible mouse-types and `NONE'.
- Use
- # define OS_MOUSE_TAG mytyp
- to add another mouse-support-tag in this enum.
-
- * Origami chooses the mouse-support depending on the value of the environment
- variable TERM. The same string is used in -M for keybind. Define it with:
- # define OS_MOUSE_NAME "mytyp"
-
- * The buttonnames in the bindinglist are created by Origami. Therefor it needs
- the following translations:
- # define OS_MOUSE_COUNT 2 /* number of mouse-buttons */
- # define OS_MOUSE_NAMES {"l","r"} /* names displayed for button 0,1 */
-
- * There must be added some code in origami/keyboard.c, which activates /
- deactives the mouse and handles the clicks. This are only hints, check your
- own environment to get information about handling your mouse.
-
- * activating the mouse:
- in init_keyboard() you have to add code, to initialise the mouse.
- * deactivate the mouse
- in reset_keyboard() you have to add code, for switching the mouse off.
- In both cases use MGR/XTERM-code as example. The scanning of the mouse can
- be done in two ways:
- * activ:
- You have to scan the mouse with a procedure/system-call. Do it like the
- # if 0 example in the get_key-loop.
- In this case, you have to define:
- # define OS_MOUSE_CODE ""
- # define OS_MOUSE_LG 0
- * passiv:
- The mouse sends a sequence of characters as header, followed by a coding
- of the position.. . Handle it like the MGR/XTERM-code. The mouse-click
- will be recognized by the normal keyboard-translations. In this case you
- have to define:
- # define OS_MOUSE_CODE "your seqyuence"
- # define OS_MOUSE_LG strlen(OS_MOUSE_CODE)
-
- New mouse-ports can only be included to the standrad-distribution, if we know
- them :-)
-